<template>
	<view style="min-height: 100vh;background-color: #F5F7FA;">
		<hx-navbar ref="hxnb" :config="config" />
		<view :class="'ckp ' + (show ? 'showon':'showdown')" style="background-image: url('/static/ckp.png');"
			ref="ckp" />
		<view :class="'context ' + (show ? 'showon':'showdown')" style="background-image: url('/static/fjps.png');"
			ref="context">
			<div class="line-a">
				<div class="box1">
					<div class="a">长春</div>
					<div class="b">龙嘉机场</div>
				</div>
				<div class="box2">
					<div class="a">行程一
						<image style="width:16px; height:16px;margin-left: 6px;transform: translateY(3.5px);"
							src="@/static/flight-fill.png" />
					</div>
					<div class="b" style="background-image: url('/static/jt.png');"></div>
					<div class="c">3162</div>
				</div>
				<div class="box3">
					<div class="a">南京</div>
					<div class="b">禄口机场</div>
				</div>
			</div>
			<div class="line-b">
				<div class="box1">
					<div class="a">出发日期</div>
					<div class="b">2022-10-01</div>
				</div>
				<div class="box2">
					<div class="a">出发时间</div>
					<div class="b">10:00</div>
				</div>
				<div class="box3">
					<div class="a">座位等级</div>
					<div class="b">A</div>
				</div>
			</div>
			<div class="line-aa">
				<div class="box1">
					<div class="a">南京</div>
					<div class="b">禄口机场</div>
				</div>
				<div class="box2">
					<div class="a">行程二
						<image style="width:16px; height:16px;margin-left: 6px;transform: translateY(3.5px);"
							src="@/static/flight-fillb.png" />
					</div>
					<div class="b" style="background-image: url('/static/jt.png');"></div>
					<div class="c">3162</div>
				</div>
				<div class="box3">
					<div class="a">上海</div>
					<div class="b">虹桥机场</div>
				</div>
			</div>
			<div class="line-bb">
				<div class="box1">
					<div class="a">出发日期</div>
					<div class="b">2022-10-01</div>
				</div>
				<div class="box2">
					<div class="a">出发时间</div>
					<div class="b">10:00</div>
				</div>
				<div class="box3">
					<div class="a">座位等级</div>
					<div class="b">A</div>
				</div>
			</div>
			<div class="line-c">
				<div class="box1">
					<div class="a">票价</div>
					<div class="b">200.00</div>
				</div>
				<div class="box2">
					<div class="a">机场建设费</div>
					<div class="b">50.00</div>
				</div>
				<div class="box3">
					<div class="a">燃油附加费</div>
					<div class="b">70.00</div>
				</div>
			</div>
			<div class="line-d">
				<div class="a">合计金额</div>
				<div class="b">320.00</div>
			</div>
			<div class="line-e">
				<div class="box1">
					<div class="a">姓名</div>
					<div class="b">李雷</div>
				</div>
				<div class="box2">
					<div class="a">电子客票码</div>
					<div class="b">8472412222853</div>
				</div>
				<div class="box3">
					<div class="a">填开日期</div>
					<div class="b">2023-02-28</div>
				</div>
			</div>
		</view>
		<view class="sub-area">
			<view class="form">
				<uni-list>
					<uni-list-item title="进项税额" rightText="￥22.29" style="height: 64px;"></uni-list-item>
					<uni-list-item title="查看票据" showArrow style="height: 63.5px;"></uni-list-item>
					<uni-list-item title="转交给其他同事" showArrow style="height: 63.5px;"></uni-list-item>
				</uni-list>
			</view>
		</view>
		<view class="button-bottom-bar">
			<custom-double-button :save="save" :edit="edit"></custom-double-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config: {
					title: '飞机票',
					color: '#FFFFFF',
					//背景颜色;参数一：透明度（0-1）;参数二：背景颜色（array则为线性渐变，string为单色背景）
					backgroundColor: [1, ['#0052D9', '#0060FF']],
					// 滑动屏幕后切换颜色，注意颜色为数组时长度必须一样，还有使用滑动切换必须监听 onPageScroll 事件
					slideBackgroundColor: [0.2, ['#0052D9', '#0060FF']],
					// 状态栏 ，数组则为滑动变色
					statusBarBackground: ['', '#ffffff'],
					backgroundImg: ['/static/bj.png', '/static/bj.png', 1, 0],
					backgroundImgHeight: 138,
					backgroundColorLinearDeg: '229deg'
				},
				show: true,
			}
		},
		onPageScroll(e) {
			// 重点，用到滑动切换必须加上
			this.$refs.hxnb.pageScroll(e);
			if (e.scrollTop > uni.getSystemInfoSync().statusBarHeight + 44) {
				this.show = false;
			} else {
				this.show = true;
			}
		},
		methods: {
			edit() {
				uni.navigateTo({
					url: '/pages/index/index'
				})
			},
			save() {
				uni.navigateTo({
					url: '/pages/index/index'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.ckp {
		width: 100%;
		height: 16px;
		background: #BFD7FF;
		box-shadow: 0 0 8px 0 rgba(13, 49, 116, 0.10);
		border-radius: 4px;
		background-size: 100% 100%;
		/* 背景图片被拉伸,覆盖整个元素 */
		margin-bottom: -8px;
		position: relative;
	}

	.showon {
		z-index: 100;
	}

	.showdown {
		z-index: 0;
	}

	.context {
		width: auto;
		/* 原来是100%1111 */
		height: 565px;
		/* background: #F2F9FE; */
		background-size: 100% 100%;
		/* 背景图片被拉伸,覆盖整个元素 */
		box-shadow: 0 0 8px 0 rgba(13, 49, 116, 0.10);
		margin-left: 12px;
		margin-right: 12px;
		border-bottom-left-radius: 8px;
		border-bottom-right-radius: 8px;
		position: relative;
	}

	.context .line-a {
		width: 100%;
		height: 80px;
		/* margin-top: 18px; */
		display: flex;
		/* text-align: center; */
	}

	.context .line-a .box1 {
		margin-left: 24px;
		margin-top: 32px;
		flex: 1;
	}

	.context .line-a .box1 .a {
		width: 52px;
		height: 26px;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		font-size: 26px;
		color: #FFFFFF;
		letter-spacing: 0;
		line-height: 26px;

	}

	.context .line-a .box1 .b {
		width: 56px;
		height: 14px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 14px;
		color: #FFFFFF;
		letter-spacing: 0;
		line-height: 14px;
		margin-top: 8px;
	}

	.context .line-a .box2 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-a .box2 .a {
		height: 16px;
		margin-left: 25px;
		color: #FFFFFF;
		font-size: 14px;
	}

	.context .line-a .box2 .b {
		width: 108px;
		height: 6px;
		background-size: cover;
		margin-top: 4px;
	}

	.context .line-a .box2 .c {
		line-height: 14px;
		margin-top: 9px;
		text-align: center;
		color: #FFFFFF;
	}

	.context .line-a .box3 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-a .box3 .a {
		width: 52px;
		height: 26px;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		font-size: 26px;
		color: #FFFFFF;
		letter-spacing: 0;
		line-height: 26px;
		float: right;
		margin-right: 24px;
	}

	.context .line-a .box3 .b {
		width: 56px;
		height: 14px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 14px;
		color: #FFFFFF;
		letter-spacing: 0;
		line-height: 14px;
		margin-top: 8px;
		float: right;
		margin-right: 24px;
	}

	.context .line-b {
		width: auto;
		height: 100px;
		margin-left: 9px;
		margin-right: 9px;
		display: flex;
		flex-direction: row;
	}

	.context .line-b .box1 {
		flex: 1;
		margin-left: 15px;
		margin-top: 32px;
	}

	.context .line-b .box1 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
	}

	.context .line-b .box1 .b {
		width: 89px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
	}

	.context .line-b .box2 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-b .box2 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		margin-left: 25%;
	}

	.context .line-b .box2 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		margin-left: 25%;
	}

	.context .line-b .box3 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-b .box3 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		float: right;
		margin-right: 35px;
	}

	.context .line-b .box3 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		float: right;
		margin-right: 40px;
	}

	.context .line-aa {
		width: 100%;
		height: 72.5px;
		/* margin-top: 18px; */
		display: flex;
		/* text-align: center; */
	}

	.context .line-aa .box1 {
		margin-left: 24px;
		margin-top: 23.5px;
		flex: 1;
	}

	.context .line-aa .box1 .a {
		width: 52px;
		height: 26px;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		font-size: 26px;
		color: #122453;
		letter-spacing: 0;
		line-height: 26px;

	}

	.context .line-aa .box1 .b {
		width: 56px;
		height: 14px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 14px;
		color: #122453;
		letter-spacing: 0;
		line-height: 14px;
		margin-top: 8px;
	}

	.context .line-aa .box2 {
		margin-top: 23.5px;
		flex: 1;
	}

	.context .line-aa .box2 .a {
		height: 16px;
		margin-left: 25px;
		font-size: 14px;
		line-height: 16px;
	}

	.context .line-aa .box2 .b {
		width: 108px;
		height: 6px;
		background-size: cover;
		margin-top: 4px;
		/* opacity: 0;
		background: #FFFFFF; */
	}

	.context .line-aa .box2 .c {
		line-height: 14px;
		margin-top: 9px;
		text-align: center;
	}

	.context .line-aa .box3 {

		margin-top: 23.5px;
		flex: 1;
	}

	.context .line-aa .box3 .a {
		width: 52px;
		height: 26px;
		font-family: PingFangSC-Medium;
		font-weight: 500;
		font-size: 26px;
		color: #122453;
		letter-spacing: 0;
		text-align: right;
		line-height: 26px;
		float: right;
		margin-right: 24px;
	}

	.context .line-aa .box3 .b {
		width: 56px;
		height: 14px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 14px;
		color: #122453;
		letter-spacing: 0;
		text-align: right;
		line-height: 14px;
		margin-top: 8px;
		float: right;
		margin-right: 24px;
	}

	.context .line-bb {
		width: auto;
		height: 104.5px;
		margin-left: 9px;
		margin-right: 9px;
		display: flex;
		flex-direction: row;
	}

	.context .line-bb .box1 {
		flex: 1;
		margin-left: 15px;
		margin-top: 32px;
	}

	.context .line-bb .box1 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
	}

	.context .line-bb .box1 .b {
		width: 89px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
	}

	.context .line-bb .box2 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-bb .box2 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		margin-left: 25%;
	}

	.context .line-bb .box2 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		margin-left: 25%;
	}

	.context .line-bb .box3 {
		margin-top: 32px;
		flex: 1;
	}

	.context .line-bb .box3 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		float: right;
		margin-right: 35px;
	}

	.context .line-bb .box3 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		float: right;
		margin-right: 40px;
	}

	.context .line-c {
		width: auto;
		height: 58px;
		margin-left: 9px;
		margin-right: 9px;

		display: flex;
		flex-direction: row;
	}

	.context .line-c .box1 {
		flex: 1;
		margin-left: 15px;
		margin-top: 15px;
	}

	.context .line-c .box1 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
	}

	.context .line-c .box1 .b {
		width: 89px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
	}

	.context .line-c .box2 {
		margin-top: 15px;
		flex: 1;
	}

	.context .line-c .box2 .a {
		width: 60px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		margin-left: 25%;
	}

	.context .line-c .box2 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		margin-left: 25%;
	}

	.context .line-c .box3 {
		margin-top: 15px;
		flex: 1;
	}

	.context .line-c .box3 .a {
		width: 60px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		float: right;
		margin-right: 32px;
	}

	.context .line-c .box3 .b {
		width: 42px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		float: right;
		margin-right: 51px;
	}

	.context .line-d {
		width: auto;
		height: 48px;
		border-radius: 4px;
		margin-top: 16px;
		margin-left: 24px;
		margin-right: 24px;
		box-shadow: 0 0 10px 0 #0d317408;
	}

	.context .line-d .a {
		float: left;
		margin-top: 17px;
		margin-left: 16px;
		width: 56px;
		height: 14px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 14px;
		color: #122453;
		letter-spacing: 0;
		line-height: 14px;
	}

	.context .line-d .b {
		float: right;
		margin-top: 14px;
		margin-right: 16px;
		width: 63px;
		height: 20px;
		font-family: HarmonyOS_Sans_Medium;
		font-weight: 500;
		font-size: 20px;
		color: #122453;
		letter-spacing: 0;
		line-height: 20px;
	}

	.context .line-e {
		width: auto;
		height: 60px;
		margin-top: 25px;
		margin-left: 9px;
		margin-right: 9px;
		display: flex;
		flex-direction: row;
	}

	.context .line-e .box1 {
		flex: 1;
		margin-left: 15px;
		margin-top: 15px;
	}

	.context .line-e .box1 .a {
		width: 48px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
	}

	.context .line-e .box1 .b {
		width: 89px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 6px;
		margin-top: 9px;
	}

	.context .line-e .box2 {
		margin-top: 15px;
		flex: 1;
	}

	.context .line-e .box2 .a {
		width: 60px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
	}

	.context .line-e .box2 .b {
		width: 119px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 9px;
	}

	.context .line-e .box3 {
		margin-top: 15px;
		flex: 1;
	}

	.context .line-e .box3 .a {
		width: 60px;
		height: 12px;
		font-family: PingFangSC-Regular;
		font-weight: 400;
		font-size: 12px;
		color: #122453;
		letter-spacing: 0;
		line-height: 12px;
		float: right;
		margin-right: 45px;
	}

	.context .line-e .box3 .b {
		width: 89px;
		height: 16px;
		font-family: HarmonyOS_Sans;
		font-weight: Sans;
		font-size: 16px;
		color: #122453;
		letter-spacing: 0;
		line-height: 16px;
		margin-top: 9px;
		float: right;
		margin-right: 16px;
	}

	.sub-area {
		padding-bottom: 60px;

		.form {
			width: auto;
			height: 192px;
			background: #FFFFFF;
			box-shadow: 0 0 8px 0 rgba(13, 49, 116, 0.10);
			/* 正常定位距离 */
			margin-top: 18px;
			margin-left: 12px;
			margin-right: 12px;
			border-radius: 8px;
		}
	}


	.button-bottom-bar {
		position: fixed;
		bottom: 16px;
		width: 100%;
	}
</style>
